package com.gitlab.lucky.common.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @program: lucky
 * @author: Mr.Han
 * @create: 2019-03-24 14:58
 **/
public class DateUtil {
    public static Long getNowTime() {
        LocalDate now = LocalDate.now();
        String s = now.toString();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date parse = null;
        try {
            parse = simpleDateFormat.parse(s);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return parse.getTime()/1000;
    }
}
